<?php
$this->breadcrumbs = array(
    'Quản lý game',
);
?>
<h1>Quản lý game</h1>

<?php
$this->widget('zii.widgets.grid.CGridView', array(
    'dataProvider' => $model->search(),
    'filter' => $model,
    'columns' => array(
        array(
            'name' => 'name',
            'type' => 'raw',
            'value'=>'CHtml::link(CHtml::encode($data->name),array("game/detail/id/".$data->id))'
        ),
        array(
            'name' => 'category',
            'value' => '$data->category->name',
        ),
        array(
            'name' => 'sapo',
            'value' => '$data->sapo',
        ),                
        array(
            'class' => 'CButtonColumn',
            'template' => '{update}{delete}',
            'buttons'=>array
            (                
                'update' => array
                (
                    'label'=>'Update',
                    'url'=>'Yii::app()->createUrl("admin/game/update", array("id"=>$data->id))',
                ),
                'delete'=> array(
                    'label'=>'Delete',
                    'url'=>'Yii::app()->createUrl("admin/game/delete", array("id"=>$data->id))',
                )
            ),
                
            
        ),
    ),
));
?>
